package com.pg.free.stage;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.scenes.scene2d.Stage;
import com.pg.free.actor.menu.About;
import com.pg.free.actor.menu.Config;
import com.pg.free.actor.menu.Exit;
import com.pg.free.actor.menu.Start;

public class MenuStage extends Stage {

	private Start start;
	private Config config;
	private About about;
	private Exit exit;

	public MenuStage(float width, float height, boolean keepAspectRatio,
			SpriteBatch batch) {
		super(width, height, keepAspectRatio, batch);
		Gdx.input.setInputProcessor(this);
		this.start = new Start();
		this.config = new Config();
		this.about = new About();
		this.exit = new Exit();
		this.addActor(this.start);
		this.addActor(this.config);
		this.addActor(this.about);
		this.addActor(this.exit);
	}

	@Override
	public void dispose() {
		start.dispose();
		config.dispose();
		about.dispose();
		exit.dispose();
		Gdx.input.setInputProcessor(null);
		super.dispose();
	}

	public void update(float delta) {
		this.act(delta);
		this.draw();
	}
}
